package com.yuoj.yuojbackendjudgeservice;

import com.yuoj.yuojbackendjudgeservice.rabbitmq.MqInitMain;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@EnableFeignClients(basePackages = {"com.yuoj.yuojbackendserviceclient.service"})
//开启服务注册发现
@EnableDiscoveryClient
//比如：全局异常处理器是一个bean，但是和这个用户模块不是在一个模块，就导致在此模块中找不到这个bean，需要使用组件扫描器去扫描
//这就是需要统一类名的原因：com.liu.xxx
@ComponentScan("com.yuoj")
public class YuojBackendJudgeServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run (YuojBackendJudgeServiceApplication.class, args);
        //初始化消息队列
        MqInitMain.init ();
    }

}
